﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace TorrentRelatedEntities
{
	public enum TorrentDownloadState { Unspecified, Error, NotLoaded, Loading, Loaded }
	public interface ITorrentDownload : INotifyPropertyChanged
	{
		string TorrentFixedID { get; }
		string TorrentDisplayName { get; }
		string TorrentShortDescription { get; }
		string FilezPath { get; }
		TorrentDownloadState DownloadState { get; }
	}
	public class ClientFunctional2Manifold
	{
		protected class TorrentDownloadRelated : ITorrentDownload
		{
			public static readonly string TorrentFixedIDPropertyName = "TorrentFixedID";
			public static readonly string TorrentDisplayNamePropertyName = "TorrentDisplayName";
			public static readonly string TorrentShortDescriptionPropertyName = "TorrentShortDescription";
			public static readonly string FilezPathPropertyName = "FilezPath";
			public static readonly string DownloadStatePropertyName = "DownloadState";
			private string _TorrentFixedID = null;
			private string _TorrentDisplayName = null;
			private string _TorrentShortDescription = null;
			private string _FilezPath = null;
			private TorrentDownloadState _DownloadState = TorrentDownloadState.Unspecified;
			public string TorrentFixedID
			{
				get { return _TorrentFixedID; }
				set
				{
					if (_TorrentFixedID != value)
					{
						_TorrentFixedID = value;
						NotifyPropertyChanged (TorrentFixedIDPropertyName);
					}
				}
			}
			public string TorrentDisplayName
			{
				get { return _TorrentDisplayName; }
				set
				{
					if (_TorrentDisplayName != value)
					{
						_TorrentDisplayName = value;
						NotifyPropertyChanged (TorrentDisplayNamePropertyName);
					}
				}
			}
			public string TorrentShortDescription
			{
				get { return _TorrentShortDescription; }
				set
				{
					if (_TorrentShortDescription != value)
					{
						_TorrentShortDescription = value;
						NotifyPropertyChanged (TorrentShortDescriptionPropertyName);
					}
				}
			}
			public string FilezPath
			{
				get { return _FilezPath; }
				set
				{
					if (_FilezPath != value)
					{
						_FilezPath = value;
						NotifyPropertyChanged (FilezPathPropertyName);
					}
				}
			}
			public TorrentDownloadState DownloadState
			{
				get { return _DownloadState; }
				set
				{
					if (_DownloadState != value)
					{
						_DownloadState = value;
						NotifyPropertyChanged (DownloadStatePropertyName);
					}
				}
			}
			public event PropertyChangedEventHandler PropertyChanged;
			private void NotifyPropertyChanged (string PropertyName)
			{
				if (PropertyChanged != null)
				{
					try
					{
						PropertyChanged (this, new PropertyChangedEventArgs (PropertyName));
					}
					catch
					{
					}
				}
			}
		}
		private void f1 ()
		{
			//ObservableCollection
		}
	}
}
